FROM mcr.microsoft.com/dotnet/sdk:7.0 AS build

WORKDIR /src
COPY ["src/AbpNet8JqMvc.Web.Host/AbpNet8JqMvc.Web.Host.csproj", "src/AbpNet8JqMvc.Web.Host/"]
COPY ["src/AbpNet8JqMvc.Web.Core/AbpNet8JqMvc.Web.Core.csproj", "src/AbpNet8JqMvc.Web.Core/"]
COPY ["src/AbpNet8JqMvc.Application/AbpNet8JqMvc.Application.csproj", "src/AbpNet8JqMvc.Application/"]
COPY ["src/AbpNet8JqMvc.Core/AbpNet8JqMvc.Core.csproj", "src/AbpNet8JqMvc.Core/"]
COPY ["src/AbpNet8JqMvc.EntityFrameworkCore/AbpNet8JqMvc.EntityFrameworkCore.csproj", "src/AbpNet8JqMvc.EntityFrameworkCore/"]
WORKDIR "/src/src/AbpNet8JqMvc.Web.Host"
RUN dotnet restore 

WORKDIR /src
COPY ["src/AbpNet8JqMvc.Web.Host", "src/AbpNet8JqMvc.Web.Host"]
COPY ["src/AbpNet8JqMvc.Web.Core", "src/AbpNet8JqMvc.Web.Core"]
COPY ["src/AbpNet8JqMvc.Application", "src/AbpNet8JqMvc.Application"]
COPY ["src/AbpNet8JqMvc.Core", "src/AbpNet8JqMvc.Core"]
COPY ["src/AbpNet8JqMvc.EntityFrameworkCore", "src/AbpNet8JqMvc.EntityFrameworkCore"]
WORKDIR "/src/src/AbpNet8JqMvc.Web.Host"
RUN dotnet publish -c Release -o /publish --no-restore

FROM mcr.microsoft.com/dotnet/aspnet:7.0
EXPOSE 80
WORKDIR /app
COPY --from=build /publish .
ENTRYPOINT ["dotnet", "AbpNet8JqMvc.Web.Host.dll"]
